package com.org.daniel.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author Daniel
 */
@Service
public class TestJob {
	private static Logger logger = LoggerFactory.getLogger(TestJob.class);

	/**
	 * 秒，分，时，日，月，周几
	 * 表示周一到周日每隔4s执行一次方法
	 */
	@Scheduled(cron = "0/4 * * * * *")
	public void testJob(){
		String a = "job";
		logger.info("测试 {}", a);
	}

}
